<template>
  <i :class="iconTag" class="iconfont"></i>
</template>

<script>
	// 阿里图标库
	import '@/assets/icon/iconfont.css'

	export default {
		name: 'Index',
		props: {
			fontClass: {
				type: String,
				required: true
			}
		},
		watch: {},
		computed: {
			// 当fontClass值发生变化,会立刻执行computed函数,将计算出来的值返回给iconTag
			iconTag() {
				return `tofu-icon-${this.fontClass}`
			}
		}
	}
</script>
